<template>
	<view class="list">
		<view class="list_item" v-for="(item,index) in data" :key = "index" @click="navigatorTo(data,index)">
			<!-- <view class="imageview">
				<image class="coverImg" :src="item.coverImg" mode="scaleToFill"></image>
			</view> -->
			<view class="content">
				<view class="title">
					{{item.name}}
				</view>
				<view class="tag">
					<view class="tag-item" v-for="item1 in item.children" :key="item1.id">
						<u-tag class="link_child" :text = item1.name type="primary" @click="tagClick(item1)"/>
		
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['data'],
		data() {
			return {
				
			}
		},
		methods: {
			navigatorTo(data,index){
				this.$emit('clickItem',data[index])
			},
			tagClick(item1){
				console.log(item1.name);
				uni.navigateTo({
					url:'../systemdetail/systemdetail?cid='+item1.id
				})
			}
		}
	}
</script>

<style lang="scss">
	.list{
		// display: flex;
		// justify-content: space-between;
		// flex-wrap: wrap;
		
		.list_item{
			// width: 355rpx;
			display: flex;
			align-items: center;
			padding: 10px;
			border-bottom: 1px solid #f6f6f6;
			
			.content{
				padding: 5px 10px;
				
				.title{
					font-size: 30rpx;
					margin-bottom: 15rpx;
				}
				.tag{
					// word-break:break-all;
					display: flex;
					position: relative;
					font-size: 20rpx;
					margin-left: -15rpx;
					flex-direction: row;
					flex-wrap: wrap;
					.tag-item{
						margin-left: 15rpx;
						margin-bottom: 10rpx;
					}
				}
			}
		}
	}
	
	
	
</style>
